//
//  HJComposeMenuButton.swift
//  Weibo
//
//  Created by 韩佳 on 16/4/25.
//  Copyright © 2016年 ddg. All rights reserved.
//

import UIKit

class HJComposeMenuButton: UIButton {

    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    override var highlighted: Bool{
        get{
            return false
        }
        set{
            
        }
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupUI(){
        titleLabel?.textAlignment = .Center
        imageView?.contentMode = .Center
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        imageView?.frame = CGRectMake(0, 0, self.frame.width, self.frame.width)
        
        titleLabel?.frame = CGRectMake(0, self.frame.width, self.frame.width, self.frame.height - self.frame.width)
        
    }
}
